package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysOrdersMapper;
import com.ruoyi.system.domain.SysOrders;
import com.ruoyi.system.service.ISysOrdersService;

/**
 * 订单管理Service业务层处理
 *
 * @author ruoyi
 * @date 2021-11-19
 */
@Service
public class SysOrdersServiceImpl implements ISysOrdersService
{
    @Autowired
    private SysOrdersMapper sysOrdersMapper;

    /**
     * 查询订单管理
     *
     * @param orderId 订单管理主键
     * @return 订单管理
     */
    @Override
    public SysOrders selectSysOrdersByOrderId(String orderId)
    {
        return sysOrdersMapper.selectSysOrdersByOrderId(orderId);
    }

    //订单详情
    @Override
    public SysOrders selectSysOrders_and_SystoolsOrders(String orderId)
    {
        return sysOrdersMapper.selectSysOrders_and_SystoolsOrders(orderId);
    }

    /**
     * 查询订单管理列表
     *
     * @param sysOrders 订单管理
     * @return 订单管理
     */
    @Override
    public List<SysOrders> selectSysOrdersList(SysOrders sysOrders)
    {
        return sysOrdersMapper.selectSysOrdersList(sysOrders);
    }

    /**
     * 新增订单管理
     *
     * @param sysOrders 订单管理
     * @return 结果
     */
    @Override
    public int insertSysOrders(SysOrders sysOrders)
    {
        return sysOrdersMapper.insertSysOrders(sysOrders);
    }

    /**
     * 修改订单管理
     *
     * @param sysOrders 订单管理
     * @return 结果
     */
    @Override
    public int updateSysOrders(SysOrders sysOrders)
    {
        return sysOrdersMapper.updateSysOrders(sysOrders);
    }

    /**
     * 批量删除订单管理
     *
     * @param orderIds 需要删除的订单管理主键
     * @return 结果
     */
    @Override
    public int deleteSysOrdersByOrderIds(String[] orderIds)
    {
        return sysOrdersMapper.deleteSysOrdersByOrderIds(orderIds);
    }


    //通过手机号查我的订单
    @Override
    public List<SysOrders> selectSysOrdersByorderPhone(String orderPhone)
    {
        return sysOrdersMapper.selectSysOrdersByorderPhone(orderPhone);
    }

    //通过手机号查我的订单1
    @Override
    public List<SysOrders> selectSysOrdersByPhone(String orderPhone)
    {
        return sysOrdersMapper.selectSysOrdersByPhone(orderPhone);
    }

    //通过维修组手机号查我的工单
    @Override
    public List<SysOrders> selectSysOrdersByMaintenancePhone(String MaintenancePhone)
    {
        return sysOrdersMapper.selectSysOrdersByMaintenancePhone(MaintenancePhone);
    }



    //通过手机号和状态查我的订单
    @Override
    public List<SysOrders> selectSysOrders_condition_ByorderPhone(String orderPhone,String orderStatus)
    {
        return sysOrdersMapper.selectSysOrders_condition_ByorderPhone(orderPhone,orderStatus);
    }

    //通过手机号和状态查我的订单价格
    @Override
    public List<SysOrders> selectSysOrders_Price(String orderPhone,String orderStatus)
    {
        return sysOrdersMapper.selectSysOrders_Price(orderPhone,orderStatus);
    }

    //通过维修组手机号和状态查我的工单
    @Override
    public List<SysOrders> selectSysOrders_condition(String orderMaintenancePhone,String orderStatus)
    {
        return sysOrdersMapper.selectSysOrders_condition(orderMaintenancePhone,orderStatus);
    }










    /**
     * 删除订单管理信息
     *
     * @param orderId 订单管理主键
     * @return 结果
     */
    @Override
    public int deleteSysOrdersByOrderId(String orderId)
    {
        return sysOrdersMapper.deleteSysOrdersByOrderId(orderId);
    }
}